import { IPSDEFormTabPage } from './ipsdeform-tab-page';
import { IPSDEFormTabPanel } from './ipsdeform-tab-panel';
import { PSDEFormDetailImpl } from './psdeform-detail-impl';

export class PSDEFormTabPanelImpl extends PSDEFormDetailImpl implements IPSDEFormTabPanel {
  protected psdeformtabpages: IPSDEFormTabPage[] | null = null;

  getPSDEFormTabPages(): IPSDEFormTabPage[] | null {
    if (this.psdeformtabpages == null) {
      this.psdeformtabpages = this.fillChildListModel(this.M.getPSDEFormTabPages, 'control.form.IPSDEFormTabPage') as IPSDEFormTabPage[];
    }
    return this.psdeformtabpages;
  }

  get psDEFormTabPages(): IPSDEFormTabPage[] | null {
    return this.getPSDEFormTabPages();
  }

  findPSDEFormTabPage(objKey: any): IPSDEFormTabPage | null {
    return this.getPSModel5('control.form.IPSDEFormTabPage', this.getPSDEFormTabPages(), objKey) as IPSDEFormTabPage;
  }

  get showCaption(): boolean {
    return this.M.showCaption;
  }

  get cls(): string {
    return 'PSDEFormTabPanelImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'control.form.IPSDEFormTabPanel') return true;
    return super.instanceof(cls);
  }
}
